function change(obj) {
	$(".jb").remove();
	num = 0;// 重置数据初始化
	var arr = document.getElementById("applyBox").getElementsByTagName("li");
	for (var i = 0; i < arr.length; i++) {
		var a = arr[i];
		a.style.background = "#fff";
		a.style.color = "#000";
	};
	obj.style.background = "#E77817";
	obj.style.color = "#fff";
	zt();
}
function zt() {
	$.ajax({
				type : "Get", // 请求方式
				url : "parttimejob.html", // 请求路径
				cache : false,
				dataType : 'json', // 返回值类型
				success : function(msg) {
					for (i in msg) {
						var information = {
							collectionId:msg[i].collectionId,
							recruitId:msg[i].recruitId,
							jobName : msg[i].jobName,
							reType : msg[i].reType
						};
						$("<li  ><a href='../../Search/showInformation.jsp?/scx/123szb="
										+ information["recruitId"]
										+ "'><div class='a_left'><div class='ico'>"
						+ "<img src='../../images/menu/"+information["reType"]+ "' /></div></div></a>"
						+ "<div onmousedown='mouseDown("+information["collectionId"]+")' class='a_right' style='border-bottom: none; width:60%;'>"
						+ "<h2>"+information["jobName"]+"</h2>"
						+ "</div></li>").appendTo("#DataList");
					}
				},
				error : function() {
					alert("error");
				}
			});
}

var mouseDown = function (collectionId) {
	setTimeout(function() {  
		$.ajax({
			type : "Post", // 请求方式
			url : "/ZDBSWebApp/delCollection.html", // 请求路径
			cache : false,
			data : {collectionId : collectionId},
			dataType : 'text', // 返回值类型
			success : function(msg) {
				$("#DataList").find("li").remove(); 
				zt();
			},
			error : function() {
				alert("error");
			}
		});
    }, 1000);  
}